namespace lucere.io
{
	/// <summary>
	/// Base implementation class for buffered <see cref="IIndexOutput">IIndexOutput</see>
	/// </summary>
	public interface IChecksumIndexOutput : IIndexOutput
	{
		IIndexOutput Main { get; set; }
		IChecksum Digest { get; }
		
		///<summary>
		/// Starts but does not complete the commit of this file (=
		/// writing of the final checksum at the end).  After this
		/// is called must call {@link #finishCommit} and the
		/// {@link #close} to complete the commit.
		/// </summary>
		void PrepareCommit();

		///<see>PrepareCommit()</see>
		void FinishCommit();
	}
}